package com.n4v1.pko.client;

import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;

import com.n4v1.pko.client.network.clientpackets.Connection;

public class GenericClient {
	public static Socket socket = null;
	public static Thread t1;

	public static void main(String[] args) {
		try {
			System.out.println("Requesting connection.");
			socket = new Socket("127.0.0.1", 7777);
			System.out.println("Connexion established, authentification :");

			t1 = new Thread(new Connection(socket));
			t1.start();

		} catch (UnknownHostException e) {
			System.err.println("Impossible to connect to host : " + socket.getLocalAddress());
		} catch (IOException e) {
			System.err.println("No server available on port : 7777");
		}
	}
}
